﻿using System;
using System.Runtime.Serialization;
    
namespace SBPweb.Twitter.Host.Connectivity
{

    public class ServiceMethodResult<TCode, TValue>
    {

        #region Private fields

        private TCode resultCode;
        private TValue resultValue;

        #endregion

        #region Constructor logic

        public ServiceMethodResult()
        {
        }

        public ServiceMethodResult(TCode code, TValue value)
        {
            resultCode = code;
            resultValue = value;
        }

        #endregion

        #region Property accessors

        public TCode Code
        {
            get
            {
                return resultCode;
            }
            set
            {
                resultCode = value;
            }
        }

        public TValue Value
        {
            get
            {
                return resultValue;
            }
            set
            {
                resultValue = value;
            }
        }

        #endregion

    }

    public class ServiceMethodResult : ServiceMethodResult<ServiceResultCode, object>
    {

        #region Constructor logic

        public ServiceMethodResult()
            : base()
        {
        }

        public ServiceMethodResult(ServiceResultCode code, object value)
            : base(code, value)
        {
        }

        #endregion

    }

}